import Mock from 'mockjs'


import {
    dataBrigadeList, dataEnforcementEvaluate,
    dataExpresswaySummary,
    dataExpresswayTrafficFlow, dataHighRiskRoadSectionCategory, dataHighRiskSection,
    dataPatrolEvaluation, dataPatrolEvaluationDetailgfxfgl, dataPatrolEvaluationDetailskfb,
    dataPatrolEvaluationDetailTable,
    dataSafetyWarningLine,
    dataSafetyWarninList,
    dataServiceSummary,
    dataXunluoPingJia,
} from "./expressway";

import {
    dataTodyPoliceStatus, realTimePoliceInformationDetail,
    realTimePoliceInformationList, riskWarningDetail,
    riskWarningList, trafficControDetail,
    trafficControlList
} from "./expressway-emergency";
import {
    brigadeList,
    expresswayList,
    securityRiskAnalysisList,
    squadronList,
    timeLineInfors, userInfor
} from "./public";
import {emergencyDutyList, emergencyDutySurveyList, policCarList, policeDutyList, policList} from "./deployment";
import {
    accidentBlackList,
    gsPoints,
    roliceStrengthList,
    rordBayonetList, slipperySectionList, tollGateList,
    trafficAccidentList,
    trafficSituationList
} from "./map";



import {sysDictList} from "../utils/sys-dic-utils";


function buildResultDto(data){
    return  {data:window.jmock[data],isSuccess:true,info:"操作成功"}
}
function buildResultDtoRow(data){
    return  {rows:window.jmock[data]}
}
function buildResultDto2(data){
    return  {data:data,isSuccess:true,info:"操作成功"}
}

Mock.setup({
    timeout: '200-1000'
});

/**
 * 公共
 * */
Mock.mock('/mock/edd/user/getUserInfo', 'get', buildResultDto('userInfor'));//

Mock.mock('/mock/public/sysDictList', 'post', buildResultDto('sysDictList'));// 字典

Mock.mock('/mock/edd/common/getBigDeptList', 'post', buildResultDto('brigadeList'));// 大队
Mock.mock('/mock/edd/common/getMiddleDeptList', 'post', buildResultDto('squadronList'));// 中队

Mock.mock('/mock/edd/motorway/getDeptMotorWay', 'post', buildResultDto('expresswayList'));// 高速

Mock.mock('/mock/edd/position/getSafetyAnalysis', 'post', buildResultDto('securityRiskAnalysisList')); // 时空分析
Mock.mock('/mock/edd/police/getSafetyAnalysis', 'post', buildResultDto('securityRiskAnalysisList')); // 时空分析
Mock.mock('/mock/edd/position/getCoverageRate', 'post', buildResultDto('coverageRate')); // 时空覆盖率  无数据
Mock.mock('/mock/edd/police/getCoverageRate', 'post', buildResultDto('coverageRate')); // 时空覆盖率  无数据
Mock.mock('/mock/edd/position/getPositionCoverMap', 'post', buildResultDto('timeLineInfors'));// 时间轴




/**
 * 勤务监控
 * */
Mock.mock('/mock/edd/monitor/getMotorSpeed', 'post', buildResultDto('dataExpresswaySummary'));// 高速运行概括
Mock.mock('/mock/edd/monitor/getRealJQ', 'post', buildResultDto('realJQ'));// 高速运行概括
Mock.mock('/mock/edd/monitor/getTrafficFlowChart', 'post', buildResultDto('dataExpresswayTrafficFlow'));// 高速交通流量

Mock.mock('/mock/edd/monitor/getRiskWaringChart', 'post', buildResultDto('dataSafetyWarningLine'));//  安全风险预警
Mock.mock('/mock/edd/monitor/getRiskWaringDetailList', 'post', buildResultDto('dataSafetyWarninList'));// 安全风险预警表格

Mock.mock('/mock/edd/monitor/getDutyPreview', 'post', buildResultDto('dataServiceSummary'));// 勤务运行预览

Mock.mock('/mock/edd/dynamicmonitor/getPatrolEvaluate', 'post', buildResultDto('dataXunluoPingJia'));// 巡逻评价
Mock.mock('/mock/edd/dynamicmonitor/getEnforcementEvaluate', 'post', buildResultDto('dataEnforcementEvaluate'));// 交通执法评价
Mock.mock('/mock/edd/dynamicmonitor/getTroubleEvaluate', 'post', buildResultDto('dataPatrolEvaluation'));// 事故处置评价
Mock.mock('/mock/edd/dynamicmonitor/getDutyTop', 'post', buildResultDto('dataBrigadeList'));// 勤务排名
/*巡逻评价模态框*/
Mock.mock('/mock/edd/dynamicmonitor/getSafetyAnalysis', 'post', buildResultDto('dataPatrolEvaluationDetailTable'));// 模态框巡逻评价table

Mock.mock('/mock/edd/dynamicmonitor/getHighRiskSection', 'post', buildResultDto('dataHighRiskSection'));// 高风险时段时空分布高速查询
Mock.mock('/mock/edd/dynamicmonitor/getHighRiskAnalysis ', 'post', buildResultDto('dataPatrolEvaluationDetailskfb'));// 高风险时段时空分布
Mock.mock('/mock/edd/dynamicmonitor/getHighRiskSectionProtalCoverRate', 'post', buildResultDto('dataPatrolEvaluationDetailgfxfgl'));// 高风险路段巡逻覆盖率
Mock.mock('/mock/edd/dynamicmonitor/getHighRiskSectionProtalTime', 'post', buildResultDto('dataHighRiskRoadSectionCategory'));// 高风险路段巡逻时长占比



/**
 * 应急值守
 * */

Mock.mock('/mock/edd/emergency/getPoliceSituationPreview', 'post', buildResultDto('dataTodyPoliceStatus'));// 今日警情

Mock.mock('/mock/edd/emergency/getRealTimePoliceInfoPage', 'post', buildResultDto('realTimePoliceInformationList'));// 实时警情列表
Mock.mock('/mock/edd/emergency/getRealTimePoliceInfo', 'post', buildResultDto('realTimePoliceInformationDetail'));// 实时警情列表详情

Mock.mock('/mock/edd/emergency/getRiskWarningPage', 'post', buildResultDto('riskWarningList'));// 风险预警列表

Mock.mock('/mock/edd/monitor/getFaceWarningScatter', 'post', buildResultDto('riskWarningDetail'));// 散列图

Mock.mock('/mock/edd/emergency/getTrafficControllList', 'post', buildResultDto('trafficControlList'));// 交通管制
Mock.mock('/mock/edd/emergency/ignoreTrafficControl', 'post', buildResultDto('trafficControlList'));// 解除交通管制
Mock.mock('/mock/edd/mappmonitor/getByLikeName', 'post', buildResultDto('expressWayAndGate'));//  地图名字搜索（高速与收费站）
Mock.mock('/mock/data/trafficControDetail', 'post', buildResultDto('trafficControDetail'));//


/**
 * 岗位安排
 * */
Mock.mock('/mock/edd/position/getPostDeploy', 'post', buildResultDto('emergencyDutySurveyList'));// 岗位安排概况
Mock.mock('/mock/edd/position/getPostDeployRecord', 'post', buildResultDto('emergencyDutyList'));// 岗位安排详情
Mock.mock('/mock/edd/position/getExcelData', 'post', buildResultDto('emergencyDutyList'));// 岗位安排详情
Mock.mock('/mock/edd/position/addPosition', 'post', buildResultDto('null'));// 添加岗位安排详情
Mock.mock('/mock/edd/position/updatePostion', 'post', buildResultDto('null'));// 修改岗位安排详情
Mock.mock('/mock/edd/position/deletePosition', 'post', buildResultDto('null'));// 删除布岗详情
Mock.mock('/mock/edd/position/getPositionDetail', 'post', buildResultDto('emergencyDutyDetail'));// 查看布岗详情
Mock.mock('/mock/edd/position/submitPostion', 'post', buildResultDto('null'));// 提交布岗
Mock.mock('/mock/edd/position/copyPostDeploy', 'post', buildResultDto('null'));// 岗位历史复制
Mock.mock('/mock/edd/position/saveDayPostion', 'post', buildResultDto('null'));// 保存
Mock.mock('/mock/edd/position/getLawEnforcementStation', 'post', buildResultDto('lawEnforcementStation'));// 执法站获取
Mock.mock('/mock/edd/position/getDeptGX', 'post', buildResultDto('deptGX'));// 执法站获取
Mock.mock('/mock/edd/position/getLawRadius', 'post', buildResultDto2(500));// 执法站获取
Mock.mock('/mock/edd/position/getIsDeploy', 'post', buildResultDto2(0));// 是否部署

/**
 * 警力安排
 * */
Mock.mock('/mock/edd/police/getPoliceDeploy', 'post', buildResultDto('policeDutyList')); //警力部署信息
Mock.mock('/mock/edd/police/getPoliceCar', 'post', buildResultDto('policCarList')); //警车查询
Mock.mock('/mock/edd/police/addPositionPolice', 'post', buildResultDto('null')); //警员分配
Mock.mock('/mock/edd/police/updatePositionPolice', 'post', buildResultDto('null')); //修改警员分配
Mock.mock('/mock/edd/police/deletePositionPolice', 'post', buildResultDto('null')); //删除警员
Mock.mock('/mock/edd/police/getPolicList', 'post', buildResultDto('policList')); //获取时间段的警力人员





/**
 * 地图
 * */

Mock.mock('/mock/edd/mappmonitor/getExpresswayRangeList', 'post', buildResultDto('expresswayRangeList')); //高速
Mock.mock('/mock/edd/mappmonitor/geTrafficSituation', 'post', buildResultDto('trafficSituationList'));//路况
Mock.mock('/mock/edd/mappmonitor/getTrafficAccident', 'post', buildResultDto('trafficAccidentList'));//事故

Mock.mock('/mock/edd/mappmonitor/getPoliceStrength', 'post', buildResultDto('roliceStrengthList'));//警力
Mock.mock('/mock/edd/mappmonitor/getPoliceTrack', 'post', buildResultDto('policeTrack'));//警力

Mock.mock('/mock/edd/mappmonitor/getConstructionList', 'post', buildResultDto('constructionList'));//施工
Mock.mock('/mock/edd/mappmonitor/getVideoList', 'post', buildResultDtoRow('videoListList'));//视频
Mock.mock('/mock/edd/mappmonitor/getFogDetectionList', 'post', buildResultDtoRow('fogDetectionList'));//雾区检测器
Mock.mock('/mock/edd/mappmonitor/getFogCollisionList', 'post', buildResultDto('fogCollisionList'));//雾区防撞
Mock.mock('/mock/edd/mappmonitor/getMeteorologicalDetectionList', 'post', buildResultDtoRow('meteorologicalDetectionList'));//气象检测器
Mock.mock('/mock/edd/mappmonitor/getGuidanceScreenList', 'post', buildResultDtoRow('guidanceScreenList'));//诱导屏
Mock.mock('/mock/edd/mappmonitor/getShoutingList', 'post', buildResultDtoRow('shoutingList'));//喊话设备

Mock.mock('/mock/edd/mappmonitor/getRordBayonet', 'post', buildResultDto('rordBayonetList'));//卡口
Mock.mock('/mock/edd/mappmonitor/getTollGate', 'post', buildResultDto('tollGateList'));//收费站，服务区
Mock.mock('/mock/edd/mappmonitor/getSlipperySection', 'post', buildResultDto('slipperySectionList'));//易滑路段 长下坡
Mock.mock('/mock/edd/mappmonitor/getAccidentBlack', 'post', buildResultDto('accidentBlackList'));//事故黑点
Mock.mock('/mock/edd/mappmonitor/getSafetyWarning', 'post', buildResultDto('safetyWarningWay'));//事故黑点


